package main

import (
	"gin-fileserver/pkg/filter"
	"gin-fileserver/pkg/logger"
	"gin-fileserver/pkg/setting"
	"gin-fileserver/server"
	"gin-fileserver/thumnailer"
)

func main() {
	// tracer.Setup()
	setting.Setup()
	logger.Setup()
	thumnailer.Setup()
	filter.Setup()

	server.Setup(server.ServerConfig{
		UploaderCfg: server.Uploader{
			Root:            "upload",
			UploadImagePath: "image",
			MaxImageCount:   10,
		},
		DownloadCfg: server.Downloader{
			Root:   "download",
			Origin: "origin",
			Thumb:  "thumb",
		},
	})

	defer thumnailer.Close()
	defer logger.Close()
	// defer tracer.Close()
}
